enum Week {
    MONDAY,TUESDAY,WEDNESDAY,THUSDAY,FRIDAY,SATURDAY,SUNDAY
}
public class Test {
    public static void main(String[] args) {
        Week day = Week.valueOf("MONDAY");
        System.out.println(" "+day);
        for(Week d:Week.values())
        {
            System.out.println("序号:"+d.ordinal()+"的值为:"+d.name());
        }
    }
}
